<?php

    class itIntelligencerTest extends itTestCase {
        
        /**
         * @test
         */
        public function testName() {
            $i = new itMockIntelligencer();
            $this->assertNull($i->getName());
            $i->setName('A');
            $this->assertEquals('A', $i->getName());
            
            $i = new itMockIntelligencer('B');
            $this->assertEquals('B', $i->getName());
        }
        
        /**
         * @test
         */
        public function testManager() {
            $i = new itMockIntelligencer();
            $this->assertNull($i->getManager());
            $manager = new itManager();
            $i->setManager($manager);
            $this->assertEquals($manager, $i->getManager());
        }
            
        /**
         * @test
         */
        public function testControl() {
            $i = new itMockIntelligencer();
            $this->assertFalse($i->inControl());
            $i->control();
            $this->assertTrue($i->inControl());
            $i->control(false);
            $this->assertFalse($i->inControl());
        }
        
        
    }
    
    class itMockIntelligencer extends itIntelligencer {
        public function load($class) {
            return true;
        }
    }
    
?>